using System;
using System.Xml;

namespace InfoJetSoft.Service.Util
{
	/// <summary>
	/// Summary description for NoRefreshViewNode.
	/// </summary>
	public class NoRefreshViewNode
	{
		private string nodeName = null;
		private bool updateSelf = false;
		private string parentNodeName = null;

		public string NodeName
		{
			get
			{
				return this.nodeName;
			}
			set
			{
				this.nodeName = value;
			}
		}

		public bool UpdateSelf
		{
			get
			{
				return this.updateSelf;
			}
			set
			{
				this.updateSelf = value;
			}
		}

		public string ParentNodeName
		{
			get
			{
				return this.parentNodeName;
			}
			set
			{
				this.parentNodeName = value;
			}
		}

		public void parseElement( XmlElement element )
		{
			this.nodeName = element.InnerText.Trim();
			string updateSelfValue = element.GetAttribute( "updateSelf" );
			if( updateSelfValue != null && updateSelfValue.Equals( "true" ) )
			{
				this.updateSelf = true;
			}
			else
			{
				this.updateSelf = false;
			}
			string parentNodeValue = element.GetAttribute( "parentNode" );
			if( parentNodeValue != null && parentNodeValue.Length >= 0 )
			{
				this.parentNodeName = parentNodeValue;
			}
		}
	}
}
